import { wechatrequest } from './API/request'

/**
 * 获取会员种类列表
 */
export const getMemberTypeListRequest = ({}) => {
  return wechatrequest.postform('/member/getMemberTypeList', {
    data: {}
  })
}

/**
 * 人才沟通
 */
export const getMemberTalentTalkRequest = ({ companyId, userId, cmpUserId, type, postId = '' }) => {
  const params = {
    companyId,
    userId,
    cmpUserId,
    type
  }
  if (postId) params.postId = postId
  return wechatrequest.postform('/member/talentTalk', {
    data: params
  })
}
/**
 * 首页人才简历列表
 */
export const getOldData = ({ archiveId }) => {
  return wechatrequest.postform('/userArchive/findTempDetailByArchiveId', {
    data: { archiveId }
  })
}

/**
 * 查询剩余免费发布岗位次数
 */
export const getPublishFreeRequest = ({ companyId }) => {
  return wechatrequest.postform('/member/companyRightInfo', {
    data: { companyId }
  })
}
/**
 * 岗位沟通
 */
export const postTalkRequest = ({ id }) => {
  return wechatrequest.postform('/member/postTalk', {
    data: {
      postId: id
    }
  })
}
